import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import { ConfigProvider } from "antd";

import { Provider } from "react-redux";
import store from "./store";

import App from "./App";
// antd的样式
import "antd/dist/reset.css";
// 引入antd中文语言包
import zhCN from "antd/locale/zh_CN";
// 其他全局样式
import "./styles/index.less";

const root = createRoot(document.getElementById("root") as HTMLElement);

root.render(
  <Provider store={store}>
    <ConfigProvider
      theme={{
        token: {
          colorPrimary: "#1DA57A",
        },
      }}
      locale={zhCN}
    >
      <BrowserRouter>
        <App />
      </BrowserRouter>
    </ConfigProvider>
  </Provider>
);
